package com.mike.myfragment1;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.Nullable;

public class MyFragment extends Fragment {

    private String content;
    public MyFragment(String content){
        this.content = content;
    }


    @Override
    public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment1,container,false);
        TextView textView = view.findViewById(R.id.txt_fragment);
        textView.setText(content);

        return view;
    }
}
